home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Shareware / Comunicatii / feedaemon / fd110rc5.exe / {app} / Data / defaults / styles / Mega Blue.fdxsl < prev    next >
Extensible Markup Language  |  2004-05-30  |  4KB  |  143 lines

  1. <?xml version="1.0"?>
  2.  
  3. <xsl:stylesheet version="1.0"
  4.     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  5.     xmlns:fd="http://www.bradsoft.com/feeddemon/xmlns/1.0/">
  6. <xsl:output method="html"/>
  7.  
  8. <xsl:variable name="common-styles">
  9.     <style type="text/css">
  10.         body {
  11.             font: 140%/140% "Trebuchet MS", Tahoma, sans-serif;
  12.             margin: 20px 30px;
  13.             color: white;
  14.             background-color: #0066CC;
  15.             filter: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#0066CC,endColorStr=#004282);                
  16.         }
  17.         a { color: #FF66B3;  }
  18.         a:hover { color: #00CCC9; }
  19.         span.nodescription {    font-size: smaller; color: silver; }
  20.         div.newspapertitle {
  21.             font-size: larger;
  22.             text-transform: uppercase;
  23.             font-weight: bold;
  24.             margin-bottom: 16px;
  25.             border-bottom: 3px solid #00CCC9;
  26.         }
  27.         div.newsitemfooter { font-size: x-small; font-style: italic; }
  28.         div.newsitemtitle {
  29.             font-weight: bold;
  30.         }
  31.         blockquote { font-style: italic;    }
  32.         div.newsitemcontent {
  33.             margin-top: 20px;
  34.         }
  35.         div.newsitembreak {
  36.             border-top: 1px dotted #AED7FF;
  37.             margin: 24px 0;
  38.         }
  39.     </style>
  40. </xsl:variable>
  41.  
  42. <!-- channel group -->
  43. <xsl:template match="newspaper[@type='group']">
  44.     <html>
  45.     <head>
  46.         <title>Group Newspaper</title>
  47.         <xsl:copy-of select="$common-styles"/>
  48.         <style type="text/css">
  49.             div.channelnewsitems {
  50.                 border: 1px solid #AED7FF;
  51.                 padding: 8px 12px;
  52.                 margin-bottom: 12px;
  53.             }
  54.             div.channeltitle {
  55.                 border: 1px solid #AED7FF;
  56.                 border-bottom: none;
  57.                 font-weight: bold;
  58.                 text-transform: uppercase;
  59.                 color: #AED7FF;
  60.                 text-align: center;
  61.             }
  62.         </style>
  63.     </head>
  64.     <body>
  65.         <xsl:variable name="newspapertype" select="@type"/>
  66.         <xsl:if test="title">
  67.             <div class="newspapertitle">
  68.                 <xsl:value-of select="title" disable-output-escaping="yes"/>
  69.             </div>
  70.         </xsl:if>
  71.         
  72.         <xsl:for-each select="channel">
  73.             <div class="channeltitle">
  74.                 <xsl:value-of select="title"/>
  75.             </div>
  76.             <div class="channelnewsitems">        
  77.                 <xsl:for-each select="item">
  78.                     <xsl:sort select="fd:sortKey" data-type="number" order="descending"/>
  79.                     <xsl:apply-templates select="."/>
  80.                     <div class="newsitembreak"></div>
  81.                 </xsl:for-each>
  82.             </div>
  83.         </xsl:for-each>
  84.     </body>
  85.     </html>    
  86. </xsl:template>
  87.  
  88. <!-- news item and channel -->
  89. <xsl:template match="newspaper[@type='newsitem' or @type='channel']">
  90.     <html>
  91.     <head>
  92.         <title>Newspaper</title>
  93.         <xsl:copy-of select="$common-styles"/>
  94.     </head>
  95.     <body>
  96.         <xsl:variable name="newspapertype" select="@type"/>
  97.         <xsl:if test="title">
  98.             <div class="newspapertitle">
  99.                 <xsl:value-of select="title" disable-output-escaping="yes"/>
  100.             </div>
  101.         </xsl:if>
  102.         
  103.         <xsl:for-each select="channel/item">
  104.             <xsl:sort select="fd:sortKey" data-type="number" order="descending"/>
  105.             <xsl:apply-templates select="."/>
  106.             <xsl:if test="$newspapertype != 'newsitem'">
  107.                 <div class="newsitembreak"></div>
  108.             </xsl:if>
  109.         </xsl:for-each>
  110.     </body>
  111.     </html>    
  112. </xsl:template>
  113.  
  114. <!-- news item template -->
  115. <xsl:template match="item">
  116.     <div class="newsitem">
  117.        <div class="newsitemtitle">
  118.             <xsl:variable name="itemlink" select="link"/>
  119.            <a href="{$itemlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
  120.         </div>            
  121.         <div class="newsitemfooter">
  122.             <xsl:variable name="srclink" select="source/@htmlUrl"/>
  123.             <xsl:value-of select="fd:dateDisplay"/> | <a href="{$srclink}"><xsl:value-of select="source"/></a>
  124.             <!-- add link to comments if available -->
  125.             <xsl:if test="comments">
  126.                 <xsl:variable name="commentlink" select="comments"/>
  127.                 <xsl:variable name="commentimg" select="'$IMAGEDIR$comments.gif'"/>
  128.                 | <a href="{$commentlink}"><img src="{$commentimg}" border="0" align="absmiddle" hspace="6"/></a>
  129.             </xsl:if>
  130.             <!-- add link to enclosure if available -->
  131.             <xsl:if test="enclosure">
  132.                 <xsl:variable name="enclosurelink" select="enclosure/@url"/>
  133.                 <xsl:variable name="enclosureimg" select="'$IMAGEDIR$enclosure.gif'"/>
  134.                 | <a href="{$enclosurelink}"><img src="{$enclosureimg}" align="absmiddle" border="0" hspace="6"/></a>
  135.             </xsl:if>
  136.         </div>
  137.         <div class="newsitemcontent">
  138.             <xsl:value-of select="description" disable-output-escaping="yes"/>
  139.         </div>
  140.     </div>
  141. </xsl:template>
  142.  
  143. </xsl:stylesheet>